package com.pro.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Date;
import java.util.List;

/**
 * @ClassName NavigationBarData
 * @Author 谭金诚
 * @Date 2021/11/4
 */
@Data
//字典类
public class NavigationBarData {
    //字典编码
    private Integer dictCode;
    //字典排序
    private Integer dictSort;
    //字典标签
    private String dictLabel;
    //字典键值
    private String dictValue;
    //字典类型
    private String dictType;
    //字典类型下的数据
    private List<NavigationBarData> children;
    //样式属性(其他样式)
    private String cssClass;
    //表格回显样式
    private String listClass;
    //是否默认，y是，n否
    private String idDefault;
    //状态，0正常，1停用
    private String status;
    //创建人
    private Integer createBy;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    //创建时间
    private Date createTime;
    //更新人
    private Integer updateBy;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    //更新时间
    private Date updateTime;
    //备注
    private String remark;
    //
    private Integer parentId;
    //获取本机ip地址
    private String lastLocalHost;
    {
        try {
            lastLocalHost = InetAddress.getLocalHost().getHostAddress();
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }
    }

    public NavigationBarData() {
    }

    public Integer getDictCode() {
        return dictCode;
    }

    public void setDictCode(Integer dictCode) {
        this.dictCode = dictCode;
    }

    public Integer getDictSort() {
        return dictSort;
    }

    public void setDictSort(Integer dictSort) {
        this.dictSort = dictSort;
    }

    public String getDictLabel() {
        return dictLabel;
    }

    public void setDictLabel(String dictLabel) {
        this.dictLabel = dictLabel;
    }

    public String getDictValue() {
        return dictValue;
    }

    public void setDictValue(String dictValue) {
        this.dictValue = dictValue;
    }

    public String getDictType() {
        return dictType;
    }

    public void setDictType(String dictType) {
        this.dictType = dictType;
    }

    public List<NavigationBarData> getChildren() {
        return children;
    }

    public void setChildren(List<NavigationBarData> children) {
        this.children = children;
    }

    public String getCssClass() {
        return cssClass;
    }

    public void setCssClass(String cssClass) {
        this.cssClass = cssClass;
    }

    public String getListClass() {
        return listClass;
    }

    public void setListClass(String listClass) {
        this.listClass = listClass;
    }

    public String getIdDefault() {
        return idDefault;
    }

    public void setIdDefault(String idDefault) {
        this.idDefault = idDefault;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Integer createBy) {
        this.createBy = createBy;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Integer updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getLastLocalHost() {
        return lastLocalHost;
    }

    public void setLastLocalHost(String lastLocalHost) {
        this.lastLocalHost = lastLocalHost;
    }

    public NavigationBarData(Integer dictCode, Integer dictSort, String dictLabel, String dictValue, String dictType, List<NavigationBarData> children, String cssClass, String listClass, String idDefault, String status, Integer createBy, Date createTime, Integer updateBy, Date updateTime, String remark, Integer parentId, String lastLocalHost) {
        this.dictCode = dictCode;
        this.dictSort = dictSort;
        this.dictLabel = dictLabel;
        this.dictValue = dictValue;
        this.dictType = dictType;
        this.children = children;
        this.cssClass = cssClass;
        this.listClass = listClass;
        this.idDefault = idDefault;
        this.status = status;
        this.createBy = createBy;
        this.createTime = createTime;
        this.updateBy = updateBy;
        this.updateTime = updateTime;
        this.remark = remark;
        this.parentId = parentId;
        this.lastLocalHost = lastLocalHost;
    }
}
